<%-- 
    Document   : newjspcapnhatchitietdealcontent
    Created on : Oct 13, 2011, 12:19:52 PM
    Author     : Administrator
--%>

<%@page import="hibernate.pojo.Chitietsanpham"%>
<%@page import="hibernate.pojo.Sanpham"%>
<%@page import="org.hibernate.HibernateException"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<head>
    <title>Admin Zing Deal | Cập nhật chi tiết sản phẩm</title>
    <meta content="text/html; charset=utf-8" http-equiv="content-type" />
    <script type="text/javascript" src="Admin/ckeditor/ckeditor.js"></script>
    <script src="Admin/ckeditor/_samples/sample.js" type="text/javascript"></script>
    <link href="Admin/ckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />
</head>
<%
    try
    {
        Chitietsanpham ctsp = (Chitietsanpham)request.getAttribute("ChiTietSanPhamCanCapNhat");
        if(ctsp!=null)
        {
%>            

<form action="admindealdetailcontroller?action=updatingproductdetail&maChiTietSanPham=<%=ctsp.getMaChiTietSanPham()%>&maSanPham=<%=ctsp.getSanpham().getMaSanPham()%>" method="post"  name="form1" id="form1">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td colspan="4">CẬP NHẬT CHI TIẾT SẢN PHẨM</td>
        </tr>
        <tr>

        </tr>
        <tr>
            <td>Tên Công Ty</td>
            <td><label>
                    <input type="text" name="txtTenCongTy" id="textfield3" value="<%=ctsp.getTenCongTy()%>" />
                </label></td>
            <td>Tên Website Công Ty</td>
            <td><label>
                    <input type="text" name="txtWebsiteCongTy" id="textfield4" value="<%=ctsp.getWebsiteCongTy()%>"/>
                </label></td>
        </tr>
        <tr>
            <td>Địa Chỉ Công Ty</td>
            <td><label>
                    <input type="text" name="txtDiaChiCongTy" id="textfield5" value="<%=ctsp.getDiaChiCongTy()%>"/>
                </label></td>
            <td>Hình Ảnh Công Ty</td>
            <td>
                <input type="text" name="fileHinhAnhCongTy" value="<%=ctsp.getHinhAnhCongTy()%>" />
                <input type="button" name="button" id="button" value="Chọn Ảnh" onClick="window.open('adminuploadfilecontroller?action=viewupload','mywindow','width=500,height=220')" /><br/>
                <img src="<%=ctsp.getHinhAnhCongTy()%>" width="150" height="150" />
            </td>
        </tr>
        <tr>
            <td> Địa Chỉ GoogleMap</td>
            <td><label>
                    <input type="text" name="txtDiaChiGoogleMap" id="textfield6" value="<%=ctsp.getDiaChiGoogleMap()%>"/>
                </label></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td valign="top" style="vertical-align:text-top">Điểm Nổi Bật</td>
            <td><label>
                    <textarea name="txtDiemNoiBat" id="textarea" cols="45" rows="5"><%=ctsp.getDiemNoiBat()%></textarea>
                </label></td>
            <td valign="top">Điều Kiện Áp Dụng</td>
            <td><label>
                    <textarea name="txtDieuKienApDung" id="textarea2" cols="45" rows="5"><%=ctsp.getDieuKienApDung()%></textarea>
                </label></td>
        </tr>
        <tr>
            <td valign="top">Thông Tin Chi Tiết</td>
            <td colspan="3">
                <textarea class="ckeditor" cols="80" id="txtaThongTinChiTiet" name="txtThongTinChiTiet" rows="10"><%=ctsp.getThongTinChiTiet()%></textarea>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>
                <input type="submit" name="button" id="button" value="Cập Nhật" />
                <input type="submit" name="button2" id="button2" value="Nhập Lại" />
            </td>
            <td>&nbsp;</td>
        </tr>
    </table>
</form>
<%    
        }
        else
        {
            out.println("Không lấy được chi tiết sản phẩm");
        }
    }
    catch(HibernateException ex)
    {
        out.println(ex);
    }
%>    
